﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Rappelz.GameServer
{
    public class WorldLocation
    {
        public WorldLocation(WorldLocation src)
        {
            weather_ratio = new byte[7, 4];
            idx = src.idx;
            location_type = src.location_type;
            for (int x = 0; x < 7; ++x)
            {
                for(int y = 0; y < 4; ++y)
                {
                    weather_ratio[x,y] = src.weather_ratio[x,y];
                }
            }
            current_weather = src.current_weather;
            weather_change_time = src.weather_change_time;
            last_changed_time = src.last_changed_time;
            shovelable_item = src.shovelable_item;
            m_vIncludeClient = src.m_vIncludeClient;
        }

        public WorldLocation()
        {
            idx = 0;
            weather_ratio = new byte[7,4];
            current_weather = 0;
            weather_change_time = 0;
            last_changed_time = 0;
            shovelable_item = 0;
            m_vIncludeClient = new List<Player>();
        }

        public enum Time : int
        {
            Dawn = 0,
            Daytime = 1,
            Evening = 2,
            Night = 3,
            Max = 4,
        }

        public enum Weather : int
        {
            Clear = 0,
            LightRain = 1,
            Rain = 2,
            HeavyRain = 3,
            LightSnow = 4,
            Snow = 5,
            HeavySnow = 6,
            Max = 7,
        }

        public enum Type : int
        {
            Etc = 0,
            Town = 1,
            Field = 2,
            NonPkField = 3,
            Dungeon = 4,
            BattleField = 5,
            EventMap = 7,
            HuntaholicLobby = 8,
            HuntaholicDungeon = 9,
            FleaMarket = 10,
        }

        public enum SpecLocId : int
        {
            Abyss = 110900,
            SecRoute1 = 130100,
            SecRoute2 = 130101,
            SecRouteAuction = 130107,
        }

        public uint idx;                        // 0x0
        public byte location_type;              // 0x4
        public byte[,] weather_ratio;           // 0x5
        public byte current_weather;            // 0x21
        public uint weather_change_time;        // 0x24
        public uint last_changed_time;          // 0x28
        public int shovelable_item;             // 0x2C
        public List<Player> m_vIncludeClient;  // 0x30
    }
}
